// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::BusinessGlossaryService;
/// let client = BusinessGlossaryService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// BusinessGlossaryService provides APIs for managing business glossary
/// resources for enterprise customers.
/// The resources currently supported in Business Glossary are:
///
/// 1. Glossary
/// 1. GlossaryCategory
/// 1. GlossaryTerm
///
/// # Configuration
///
/// To configure `BusinessGlossaryService` use the `with_*` methods in the type returned
/// by [builder()][BusinessGlossaryService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::business_glossary_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::business_glossary_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `BusinessGlossaryService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `BusinessGlossaryService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct BusinessGlossaryService {
    inner: std::sync::Arc<dyn super::stub::dynamic::BusinessGlossaryService>,
}

impl BusinessGlossaryService {
    /// Returns a builder for [BusinessGlossaryService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::BusinessGlossaryService;
    /// let client = BusinessGlossaryService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::business_glossary_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::business_glossary_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::BusinessGlossaryService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::BusinessGlossaryService>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BusinessGlossaryService> {
        super::transport::BusinessGlossaryService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BusinessGlossaryService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::BusinessGlossaryService::new)
    }

    /// Creates a new Glossary resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_glossary(&self) -> super::builder::business_glossary_service::CreateGlossary {
        super::builder::business_glossary_service::CreateGlossary::new(self.inner.clone())
    }

    /// Updates a Glossary resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_glossary(&self) -> super::builder::business_glossary_service::UpdateGlossary {
        super::builder::business_glossary_service::UpdateGlossary::new(self.inner.clone())
    }

    /// Deletes a Glossary resource. All the categories and terms within the
    /// Glossary must be deleted before the Glossary can be deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_glossary(&self) -> super::builder::business_glossary_service::DeleteGlossary {
        super::builder::business_glossary_service::DeleteGlossary::new(self.inner.clone())
    }

    /// Gets a Glossary resource.
    pub fn get_glossary(&self) -> super::builder::business_glossary_service::GetGlossary {
        super::builder::business_glossary_service::GetGlossary::new(self.inner.clone())
    }

    /// Lists Glossary resources in a project and location.
    pub fn list_glossaries(&self) -> super::builder::business_glossary_service::ListGlossaries {
        super::builder::business_glossary_service::ListGlossaries::new(self.inner.clone())
    }

    /// Creates a new GlossaryCategory resource.
    pub fn create_glossary_category(
        &self,
    ) -> super::builder::business_glossary_service::CreateGlossaryCategory {
        super::builder::business_glossary_service::CreateGlossaryCategory::new(self.inner.clone())
    }

    /// Updates a GlossaryCategory resource.
    pub fn update_glossary_category(
        &self,
    ) -> super::builder::business_glossary_service::UpdateGlossaryCategory {
        super::builder::business_glossary_service::UpdateGlossaryCategory::new(self.inner.clone())
    }

    /// Deletes a GlossaryCategory resource. All the GlossaryCategories and
    /// GlossaryTerms nested directly under the specified GlossaryCategory will be
    /// moved one level up to the parent in the hierarchy.
    pub fn delete_glossary_category(
        &self,
    ) -> super::builder::business_glossary_service::DeleteGlossaryCategory {
        super::builder::business_glossary_service::DeleteGlossaryCategory::new(self.inner.clone())
    }

    /// Gets a GlossaryCategory resource.
    pub fn get_glossary_category(
        &self,
    ) -> super::builder::business_glossary_service::GetGlossaryCategory {
        super::builder::business_glossary_service::GetGlossaryCategory::new(self.inner.clone())
    }

    /// Lists GlossaryCategory resources in a Glossary.
    pub fn list_glossary_categories(
        &self,
    ) -> super::builder::business_glossary_service::ListGlossaryCategories {
        super::builder::business_glossary_service::ListGlossaryCategories::new(self.inner.clone())
    }

    /// Creates a new GlossaryTerm resource.
    pub fn create_glossary_term(
        &self,
    ) -> super::builder::business_glossary_service::CreateGlossaryTerm {
        super::builder::business_glossary_service::CreateGlossaryTerm::new(self.inner.clone())
    }

    /// Updates a GlossaryTerm resource.
    pub fn update_glossary_term(
        &self,
    ) -> super::builder::business_glossary_service::UpdateGlossaryTerm {
        super::builder::business_glossary_service::UpdateGlossaryTerm::new(self.inner.clone())
    }

    /// Deletes a GlossaryTerm resource.
    pub fn delete_glossary_term(
        &self,
    ) -> super::builder::business_glossary_service::DeleteGlossaryTerm {
        super::builder::business_glossary_service::DeleteGlossaryTerm::new(self.inner.clone())
    }

    /// Gets a GlossaryTerm resource.
    pub fn get_glossary_term(&self) -> super::builder::business_glossary_service::GetGlossaryTerm {
        super::builder::business_glossary_service::GetGlossaryTerm::new(self.inner.clone())
    }

    /// Lists GlossaryTerm resources in a Glossary.
    pub fn list_glossary_terms(
        &self,
    ) -> super::builder::business_glossary_service::ListGlossaryTerms {
        super::builder::business_glossary_service::ListGlossaryTerms::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::business_glossary_service::ListLocations {
        super::builder::business_glossary_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::business_glossary_service::GetLocation {
        super::builder::business_glossary_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::business_glossary_service::SetIamPolicy {
        super::builder::business_glossary_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::business_glossary_service::GetIamPolicy {
        super::builder::business_glossary_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::business_glossary_service::TestIamPermissions {
        super::builder::business_glossary_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::business_glossary_service::ListOperations {
        super::builder::business_glossary_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::business_glossary_service::GetOperation {
        super::builder::business_glossary_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::business_glossary_service::DeleteOperation {
        super::builder::business_glossary_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::business_glossary_service::CancelOperation {
        super::builder::business_glossary_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::CatalogService;
/// let client = CatalogService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The primary resources offered by this service are EntryGroups, EntryTypes,
/// AspectTypes, Entries and EntryLinks. They collectively let data
/// administrators organize, manage, secure, and catalog data located across
/// cloud projects in their organization in a variety of storage systems,
/// including Cloud Storage and BigQuery.
///
/// # Configuration
///
/// To configure `CatalogService` use the `with_*` methods in the type returned
/// by [builder()][CatalogService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::catalog_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::catalog_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `CatalogService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `CatalogService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct CatalogService {
    inner: std::sync::Arc<dyn super::stub::dynamic::CatalogService>,
}

impl CatalogService {
    /// Returns a builder for [CatalogService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::CatalogService;
    /// let client = CatalogService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::catalog_service::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::catalog_service::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::CatalogService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::CatalogService>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::CatalogService> {
        super::transport::CatalogService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::CatalogService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::CatalogService::new)
    }

    /// Creates an EntryType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_entry_type(&self) -> super::builder::catalog_service::CreateEntryType {
        super::builder::catalog_service::CreateEntryType::new(self.inner.clone())
    }

    /// Updates an EntryType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_entry_type(&self) -> super::builder::catalog_service::UpdateEntryType {
        super::builder::catalog_service::UpdateEntryType::new(self.inner.clone())
    }

    /// Deletes an EntryType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_entry_type(&self) -> super::builder::catalog_service::DeleteEntryType {
        super::builder::catalog_service::DeleteEntryType::new(self.inner.clone())
    }

    /// Lists EntryType resources in a project and location.
    pub fn list_entry_types(&self) -> super::builder::catalog_service::ListEntryTypes {
        super::builder::catalog_service::ListEntryTypes::new(self.inner.clone())
    }

    /// Gets an EntryType.
    pub fn get_entry_type(&self) -> super::builder::catalog_service::GetEntryType {
        super::builder::catalog_service::GetEntryType::new(self.inner.clone())
    }

    /// Creates an AspectType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_aspect_type(&self) -> super::builder::catalog_service::CreateAspectType {
        super::builder::catalog_service::CreateAspectType::new(self.inner.clone())
    }

    /// Updates an AspectType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_aspect_type(&self) -> super::builder::catalog_service::UpdateAspectType {
        super::builder::catalog_service::UpdateAspectType::new(self.inner.clone())
    }

    /// Deletes an AspectType.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_aspect_type(&self) -> super::builder::catalog_service::DeleteAspectType {
        super::builder::catalog_service::DeleteAspectType::new(self.inner.clone())
    }

    /// Lists AspectType resources in a project and location.
    pub fn list_aspect_types(&self) -> super::builder::catalog_service::ListAspectTypes {
        super::builder::catalog_service::ListAspectTypes::new(self.inner.clone())
    }

    /// Gets an AspectType.
    pub fn get_aspect_type(&self) -> super::builder::catalog_service::GetAspectType {
        super::builder::catalog_service::GetAspectType::new(self.inner.clone())
    }

    /// Creates an EntryGroup.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_entry_group(&self) -> super::builder::catalog_service::CreateEntryGroup {
        super::builder::catalog_service::CreateEntryGroup::new(self.inner.clone())
    }

    /// Updates an EntryGroup.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_entry_group(&self) -> super::builder::catalog_service::UpdateEntryGroup {
        super::builder::catalog_service::UpdateEntryGroup::new(self.inner.clone())
    }

    /// Deletes an EntryGroup.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_entry_group(&self) -> super::builder::catalog_service::DeleteEntryGroup {
        super::builder::catalog_service::DeleteEntryGroup::new(self.inner.clone())
    }

    /// Lists EntryGroup resources in a project and location.
    pub fn list_entry_groups(&self) -> super::builder::catalog_service::ListEntryGroups {
        super::builder::catalog_service::ListEntryGroups::new(self.inner.clone())
    }

    /// Gets an EntryGroup.
    pub fn get_entry_group(&self) -> super::builder::catalog_service::GetEntryGroup {
        super::builder::catalog_service::GetEntryGroup::new(self.inner.clone())
    }

    /// Creates an Entry.
    pub fn create_entry(&self) -> super::builder::catalog_service::CreateEntry {
        super::builder::catalog_service::CreateEntry::new(self.inner.clone())
    }

    /// Updates an Entry.
    pub fn update_entry(&self) -> super::builder::catalog_service::UpdateEntry {
        super::builder::catalog_service::UpdateEntry::new(self.inner.clone())
    }

    /// Deletes an Entry.
    pub fn delete_entry(&self) -> super::builder::catalog_service::DeleteEntry {
        super::builder::catalog_service::DeleteEntry::new(self.inner.clone())
    }

    /// Lists Entries within an EntryGroup.
    /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
    /// Metastore metadata that is stored in Dataplex Universal Catalog is
    /// changing. For more information, see [Changes to metadata stored in
    /// Dataplex Universal
    /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
    pub fn list_entries(&self) -> super::builder::catalog_service::ListEntries {
        super::builder::catalog_service::ListEntries::new(self.inner.clone())
    }

    /// Gets an Entry.
    /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
    /// Metastore metadata that is stored in Dataplex Universal Catalog is
    /// changing. For more information, see [Changes to metadata stored in
    /// Dataplex Universal
    /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
    pub fn get_entry(&self) -> super::builder::catalog_service::GetEntry {
        super::builder::catalog_service::GetEntry::new(self.inner.clone())
    }

    /// Looks up an entry by name using the permission on the source system.
    /// Caution: The Vertex AI, Bigtable, Spanner, Pub/Sub, Dataform, and Dataproc
    /// Metastore metadata that is stored in Dataplex Universal Catalog is
    /// changing. For more information, see [Changes to metadata stored in
    /// Dataplex Universal
    /// Catalog](https://cloud.google.com/dataplex/docs/metadata-changes).
    pub fn lookup_entry(&self) -> super::builder::catalog_service::LookupEntry {
        super::builder::catalog_service::LookupEntry::new(self.inner.clone())
    }

    /// Searches for Entries matching the given query and scope.
    pub fn search_entries(&self) -> super::builder::catalog_service::SearchEntries {
        super::builder::catalog_service::SearchEntries::new(self.inner.clone())
    }

    /// Creates a metadata job. For example, use a metadata job to import metadata
    /// from a third-party system into Dataplex Universal Catalog.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_metadata_job(&self) -> super::builder::catalog_service::CreateMetadataJob {
        super::builder::catalog_service::CreateMetadataJob::new(self.inner.clone())
    }

    /// Gets a metadata job.
    pub fn get_metadata_job(&self) -> super::builder::catalog_service::GetMetadataJob {
        super::builder::catalog_service::GetMetadataJob::new(self.inner.clone())
    }

    /// Lists metadata jobs.
    pub fn list_metadata_jobs(&self) -> super::builder::catalog_service::ListMetadataJobs {
        super::builder::catalog_service::ListMetadataJobs::new(self.inner.clone())
    }

    /// Cancels a metadata job.
    ///
    /// If you cancel a metadata import job that is in progress, the changes in the
    /// job might be partially applied. We recommend that you reset the state of
    /// the entry groups in your project by running another metadata job that
    /// reverts the changes from the canceled job.
    pub fn cancel_metadata_job(&self) -> super::builder::catalog_service::CancelMetadataJob {
        super::builder::catalog_service::CancelMetadataJob::new(self.inner.clone())
    }

    /// Creates an Entry Link.
    pub fn create_entry_link(&self) -> super::builder::catalog_service::CreateEntryLink {
        super::builder::catalog_service::CreateEntryLink::new(self.inner.clone())
    }

    /// Deletes an Entry Link.
    pub fn delete_entry_link(&self) -> super::builder::catalog_service::DeleteEntryLink {
        super::builder::catalog_service::DeleteEntryLink::new(self.inner.clone())
    }

    /// Gets an Entry Link.
    pub fn get_entry_link(&self) -> super::builder::catalog_service::GetEntryLink {
        super::builder::catalog_service::GetEntryLink::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::catalog_service::ListLocations {
        super::builder::catalog_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::catalog_service::GetLocation {
        super::builder::catalog_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::catalog_service::SetIamPolicy {
        super::builder::catalog_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::catalog_service::GetIamPolicy {
        super::builder::catalog_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::catalog_service::TestIamPermissions {
        super::builder::catalog_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::catalog_service::ListOperations {
        super::builder::catalog_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::catalog_service::GetOperation {
        super::builder::catalog_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::catalog_service::DeleteOperation {
        super::builder::catalog_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::catalog_service::CancelOperation {
        super::builder::catalog_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::CmekService;
/// let client = CmekService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK) Service
///
/// # Configuration
///
/// To configure `CmekService` use the `with_*` methods in the type returned
/// by [builder()][CmekService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::cmek_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::cmek_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `CmekService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `CmekService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct CmekService {
    inner: std::sync::Arc<dyn super::stub::dynamic::CmekService>,
}

impl CmekService {
    /// Returns a builder for [CmekService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::CmekService;
    /// let client = CmekService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::cmek_service::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::cmek_service::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::CmekService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::CmekService>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::CmekService> {
        super::transport::CmekService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::CmekService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::CmekService::new)
    }

    /// Create an EncryptionConfig.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_encryption_config(&self) -> super::builder::cmek_service::CreateEncryptionConfig {
        super::builder::cmek_service::CreateEncryptionConfig::new(self.inner.clone())
    }

    /// Update an EncryptionConfig.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_encryption_config(&self) -> super::builder::cmek_service::UpdateEncryptionConfig {
        super::builder::cmek_service::UpdateEncryptionConfig::new(self.inner.clone())
    }

    /// Delete an EncryptionConfig.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_encryption_config(&self) -> super::builder::cmek_service::DeleteEncryptionConfig {
        super::builder::cmek_service::DeleteEncryptionConfig::new(self.inner.clone())
    }

    /// List EncryptionConfigs.
    pub fn list_encryption_configs(&self) -> super::builder::cmek_service::ListEncryptionConfigs {
        super::builder::cmek_service::ListEncryptionConfigs::new(self.inner.clone())
    }

    /// Get an EncryptionConfig.
    pub fn get_encryption_config(&self) -> super::builder::cmek_service::GetEncryptionConfig {
        super::builder::cmek_service::GetEncryptionConfig::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::cmek_service::ListLocations {
        super::builder::cmek_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::cmek_service::GetLocation {
        super::builder::cmek_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::cmek_service::SetIamPolicy {
        super::builder::cmek_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::cmek_service::GetIamPolicy {
        super::builder::cmek_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::cmek_service::TestIamPermissions {
        super::builder::cmek_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::cmek_service::ListOperations {
        super::builder::cmek_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::cmek_service::GetOperation {
        super::builder::cmek_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::cmek_service::DeleteOperation {
        super::builder::cmek_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::cmek_service::CancelOperation {
        super::builder::cmek_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::ContentService;
/// let client = ContentService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// ContentService manages Notebook and SQL Scripts for Dataplex Universal
/// Catalog.
///
/// # Configuration
///
/// To configure `ContentService` use the `with_*` methods in the type returned
/// by [builder()][ContentService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::content_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::content_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ContentService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ContentService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ContentService {
    inner: std::sync::Arc<dyn super::stub::dynamic::ContentService>,
}

impl ContentService {
    /// Returns a builder for [ContentService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::ContentService;
    /// let client = ContentService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::content_service::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::content_service::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ContentService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ContentService>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ContentService> {
        super::transport::ContentService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ContentService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ContentService::new)
    }

    /// Create a content.
    pub fn create_content(&self) -> super::builder::content_service::CreateContent {
        super::builder::content_service::CreateContent::new(self.inner.clone())
    }

    /// Update a content. Only supports full resource update.
    pub fn update_content(&self) -> super::builder::content_service::UpdateContent {
        super::builder::content_service::UpdateContent::new(self.inner.clone())
    }

    /// Delete a content.
    pub fn delete_content(&self) -> super::builder::content_service::DeleteContent {
        super::builder::content_service::DeleteContent::new(self.inner.clone())
    }

    /// Get a content resource.
    pub fn get_content(&self) -> super::builder::content_service::GetContent {
        super::builder::content_service::GetContent::new(self.inner.clone())
    }

    /// Gets the access control policy for a contentitem resource. A `NOT_FOUND`
    /// error is returned if the resource does not exist. An empty policy is
    /// returned if the resource exists but does not have a policy set on it.
    ///
    /// Caller must have Google IAM `dataplex.content.getIamPolicy` permission
    /// on the resource.
    pub fn get_iam_policy(&self) -> super::builder::content_service::GetIamPolicy {
        super::builder::content_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified contentitem resource.
    /// Replaces any existing policy.
    ///
    /// Caller must have Google IAM `dataplex.content.setIamPolicy` permission
    /// on the resource.
    pub fn set_iam_policy(&self) -> super::builder::content_service::SetIamPolicy {
        super::builder::content_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Returns the caller's permissions on a resource.
    /// If the resource does not exist, an empty set of
    /// permissions is returned (a `NOT_FOUND` error is not returned).
    ///
    /// A caller is not required to have Google IAM permission to make this
    /// request.
    ///
    /// Note: This operation is designed to be used for building permission-aware
    /// UIs and command-line tools, not for authorization checking. This operation
    /// may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::content_service::TestIamPermissions {
        super::builder::content_service::TestIamPermissions::new(self.inner.clone())
    }

    /// List content.
    pub fn list_content(&self) -> super::builder::content_service::ListContent {
        super::builder::content_service::ListContent::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::content_service::ListLocations {
        super::builder::content_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::content_service::GetLocation {
        super::builder::content_service::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::content_service::ListOperations {
        super::builder::content_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::content_service::GetOperation {
        super::builder::content_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::content_service::DeleteOperation {
        super::builder::content_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::content_service::CancelOperation {
        super::builder::content_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::DataTaxonomyService;
/// let client = DataTaxonomyService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// DataTaxonomyService enables attribute-based governance. The resources
/// currently offered include DataTaxonomy and DataAttribute.
///
/// # Configuration
///
/// To configure `DataTaxonomyService` use the `with_*` methods in the type returned
/// by [builder()][DataTaxonomyService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::data_taxonomy_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::data_taxonomy_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `DataTaxonomyService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `DataTaxonomyService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
#[deprecated]
pub struct DataTaxonomyService {
    inner: std::sync::Arc<dyn super::stub::dynamic::DataTaxonomyService>,
}

impl DataTaxonomyService {
    /// Returns a builder for [DataTaxonomyService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::DataTaxonomyService;
    /// let client = DataTaxonomyService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::data_taxonomy_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::data_taxonomy_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::DataTaxonomyService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::DataTaxonomyService>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataTaxonomyService> {
        super::transport::DataTaxonomyService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataTaxonomyService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::DataTaxonomyService::new)
    }

    /// Create a DataTaxonomy resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_data_taxonomy(
        &self,
    ) -> super::builder::data_taxonomy_service::CreateDataTaxonomy {
        super::builder::data_taxonomy_service::CreateDataTaxonomy::new(self.inner.clone())
    }

    /// Updates a DataTaxonomy resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_data_taxonomy(
        &self,
    ) -> super::builder::data_taxonomy_service::UpdateDataTaxonomy {
        super::builder::data_taxonomy_service::UpdateDataTaxonomy::new(self.inner.clone())
    }

    /// Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
    /// must be deleted before the DataTaxonomy can be deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_data_taxonomy(
        &self,
    ) -> super::builder::data_taxonomy_service::DeleteDataTaxonomy {
        super::builder::data_taxonomy_service::DeleteDataTaxonomy::new(self.inner.clone())
    }

    /// Lists DataTaxonomy resources in a project and location.
    #[deprecated]
    pub fn list_data_taxonomies(
        &self,
    ) -> super::builder::data_taxonomy_service::ListDataTaxonomies {
        super::builder::data_taxonomy_service::ListDataTaxonomies::new(self.inner.clone())
    }

    /// Retrieves a DataTaxonomy resource.
    #[deprecated]
    pub fn get_data_taxonomy(&self) -> super::builder::data_taxonomy_service::GetDataTaxonomy {
        super::builder::data_taxonomy_service::GetDataTaxonomy::new(self.inner.clone())
    }

    /// Create a DataAttributeBinding resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_data_attribute_binding(
        &self,
    ) -> super::builder::data_taxonomy_service::CreateDataAttributeBinding {
        super::builder::data_taxonomy_service::CreateDataAttributeBinding::new(self.inner.clone())
    }

    /// Updates a DataAttributeBinding resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_data_attribute_binding(
        &self,
    ) -> super::builder::data_taxonomy_service::UpdateDataAttributeBinding {
        super::builder::data_taxonomy_service::UpdateDataAttributeBinding::new(self.inner.clone())
    }

    /// Deletes a DataAttributeBinding resource. All attributes within the
    /// DataAttributeBinding must be deleted before the DataAttributeBinding can be
    /// deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_data_attribute_binding(
        &self,
    ) -> super::builder::data_taxonomy_service::DeleteDataAttributeBinding {
        super::builder::data_taxonomy_service::DeleteDataAttributeBinding::new(self.inner.clone())
    }

    /// Lists DataAttributeBinding resources in a project and location.
    #[deprecated]
    pub fn list_data_attribute_bindings(
        &self,
    ) -> super::builder::data_taxonomy_service::ListDataAttributeBindings {
        super::builder::data_taxonomy_service::ListDataAttributeBindings::new(self.inner.clone())
    }

    /// Retrieves a DataAttributeBinding resource.
    #[deprecated]
    pub fn get_data_attribute_binding(
        &self,
    ) -> super::builder::data_taxonomy_service::GetDataAttributeBinding {
        super::builder::data_taxonomy_service::GetDataAttributeBinding::new(self.inner.clone())
    }

    /// Create a DataAttribute resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn create_data_attribute(
        &self,
    ) -> super::builder::data_taxonomy_service::CreateDataAttribute {
        super::builder::data_taxonomy_service::CreateDataAttribute::new(self.inner.clone())
    }

    /// Updates a DataAttribute resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn update_data_attribute(
        &self,
    ) -> super::builder::data_taxonomy_service::UpdateDataAttribute {
        super::builder::data_taxonomy_service::UpdateDataAttribute::new(self.inner.clone())
    }

    /// Deletes a Data Attribute resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    #[deprecated]
    pub fn delete_data_attribute(
        &self,
    ) -> super::builder::data_taxonomy_service::DeleteDataAttribute {
        super::builder::data_taxonomy_service::DeleteDataAttribute::new(self.inner.clone())
    }

    /// Lists Data Attribute resources in a DataTaxonomy.
    #[deprecated]
    pub fn list_data_attributes(
        &self,
    ) -> super::builder::data_taxonomy_service::ListDataAttributes {
        super::builder::data_taxonomy_service::ListDataAttributes::new(self.inner.clone())
    }

    /// Retrieves a Data Attribute resource.
    #[deprecated]
    pub fn get_data_attribute(&self) -> super::builder::data_taxonomy_service::GetDataAttribute {
        super::builder::data_taxonomy_service::GetDataAttribute::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::data_taxonomy_service::ListLocations {
        super::builder::data_taxonomy_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::data_taxonomy_service::GetLocation {
        super::builder::data_taxonomy_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::data_taxonomy_service::SetIamPolicy {
        super::builder::data_taxonomy_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::data_taxonomy_service::GetIamPolicy {
        super::builder::data_taxonomy_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::data_taxonomy_service::TestIamPermissions {
        super::builder::data_taxonomy_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::data_taxonomy_service::ListOperations {
        super::builder::data_taxonomy_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::data_taxonomy_service::GetOperation {
        super::builder::data_taxonomy_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::data_taxonomy_service::DeleteOperation {
        super::builder::data_taxonomy_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::data_taxonomy_service::CancelOperation {
        super::builder::data_taxonomy_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::DataScanService;
/// let client = DataScanService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// DataScanService manages DataScan resources which can be configured to run
/// various types of data scanning workload and generate enriched metadata (e.g.
/// Data Profile, Data Quality) for the data source.
///
/// # Configuration
///
/// To configure `DataScanService` use the `with_*` methods in the type returned
/// by [builder()][DataScanService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::data_scan_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::data_scan_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `DataScanService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `DataScanService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct DataScanService {
    inner: std::sync::Arc<dyn super::stub::dynamic::DataScanService>,
}

impl DataScanService {
    /// Returns a builder for [DataScanService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::DataScanService;
    /// let client = DataScanService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::data_scan_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::data_scan_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::DataScanService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::DataScanService>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataScanService> {
        super::transport::DataScanService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataScanService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::DataScanService::new)
    }

    /// Creates a DataScan resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_data_scan(&self) -> super::builder::data_scan_service::CreateDataScan {
        super::builder::data_scan_service::CreateDataScan::new(self.inner.clone())
    }

    /// Updates a DataScan resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_data_scan(&self) -> super::builder::data_scan_service::UpdateDataScan {
        super::builder::data_scan_service::UpdateDataScan::new(self.inner.clone())
    }

    /// Deletes a DataScan resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_data_scan(&self) -> super::builder::data_scan_service::DeleteDataScan {
        super::builder::data_scan_service::DeleteDataScan::new(self.inner.clone())
    }

    /// Gets a DataScan resource.
    pub fn get_data_scan(&self) -> super::builder::data_scan_service::GetDataScan {
        super::builder::data_scan_service::GetDataScan::new(self.inner.clone())
    }

    /// Lists DataScans.
    pub fn list_data_scans(&self) -> super::builder::data_scan_service::ListDataScans {
        super::builder::data_scan_service::ListDataScans::new(self.inner.clone())
    }

    /// Runs an on-demand execution of a DataScan
    pub fn run_data_scan(&self) -> super::builder::data_scan_service::RunDataScan {
        super::builder::data_scan_service::RunDataScan::new(self.inner.clone())
    }

    /// Gets a DataScanJob resource.
    pub fn get_data_scan_job(&self) -> super::builder::data_scan_service::GetDataScanJob {
        super::builder::data_scan_service::GetDataScanJob::new(self.inner.clone())
    }

    /// Lists DataScanJobs under the given DataScan.
    pub fn list_data_scan_jobs(&self) -> super::builder::data_scan_service::ListDataScanJobs {
        super::builder::data_scan_service::ListDataScanJobs::new(self.inner.clone())
    }

    /// Generates recommended data quality rules based on the results of a data
    /// profiling scan.
    ///
    /// Use the recommendations to build rules for a data quality scan.
    pub fn generate_data_quality_rules(
        &self,
    ) -> super::builder::data_scan_service::GenerateDataQualityRules {
        super::builder::data_scan_service::GenerateDataQualityRules::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::data_scan_service::ListLocations {
        super::builder::data_scan_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::data_scan_service::GetLocation {
        super::builder::data_scan_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::data_scan_service::SetIamPolicy {
        super::builder::data_scan_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::data_scan_service::GetIamPolicy {
        super::builder::data_scan_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::data_scan_service::TestIamPermissions {
        super::builder::data_scan_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::data_scan_service::ListOperations {
        super::builder::data_scan_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::data_scan_service::GetOperation {
        super::builder::data_scan_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::data_scan_service::DeleteOperation {
        super::builder::data_scan_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::data_scan_service::CancelOperation {
        super::builder::data_scan_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::MetadataService;
/// let client = MetadataService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Metadata service manages metadata resources such as tables, filesets and
/// partitions.
///
/// # Configuration
///
/// To configure `MetadataService` use the `with_*` methods in the type returned
/// by [builder()][MetadataService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::metadata_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::metadata_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `MetadataService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `MetadataService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct MetadataService {
    inner: std::sync::Arc<dyn super::stub::dynamic::MetadataService>,
}

impl MetadataService {
    /// Returns a builder for [MetadataService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::MetadataService;
    /// let client = MetadataService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::metadata_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::metadata_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::MetadataService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::MetadataService>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::MetadataService> {
        super::transport::MetadataService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::MetadataService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::MetadataService::new)
    }

    /// Create a metadata entity.
    pub fn create_entity(&self) -> super::builder::metadata_service::CreateEntity {
        super::builder::metadata_service::CreateEntity::new(self.inner.clone())
    }

    /// Update a metadata entity. Only supports full resource update.
    pub fn update_entity(&self) -> super::builder::metadata_service::UpdateEntity {
        super::builder::metadata_service::UpdateEntity::new(self.inner.clone())
    }

    /// Delete a metadata entity.
    pub fn delete_entity(&self) -> super::builder::metadata_service::DeleteEntity {
        super::builder::metadata_service::DeleteEntity::new(self.inner.clone())
    }

    /// Get a metadata entity.
    pub fn get_entity(&self) -> super::builder::metadata_service::GetEntity {
        super::builder::metadata_service::GetEntity::new(self.inner.clone())
    }

    /// List metadata entities in a zone.
    pub fn list_entities(&self) -> super::builder::metadata_service::ListEntities {
        super::builder::metadata_service::ListEntities::new(self.inner.clone())
    }

    /// Create a metadata partition.
    pub fn create_partition(&self) -> super::builder::metadata_service::CreatePartition {
        super::builder::metadata_service::CreatePartition::new(self.inner.clone())
    }

    /// Delete a metadata partition.
    pub fn delete_partition(&self) -> super::builder::metadata_service::DeletePartition {
        super::builder::metadata_service::DeletePartition::new(self.inner.clone())
    }

    /// Get a metadata partition of an entity.
    pub fn get_partition(&self) -> super::builder::metadata_service::GetPartition {
        super::builder::metadata_service::GetPartition::new(self.inner.clone())
    }

    /// List metadata partitions of an entity.
    pub fn list_partitions(&self) -> super::builder::metadata_service::ListPartitions {
        super::builder::metadata_service::ListPartitions::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::metadata_service::ListLocations {
        super::builder::metadata_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::metadata_service::GetLocation {
        super::builder::metadata_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::metadata_service::SetIamPolicy {
        super::builder::metadata_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::metadata_service::GetIamPolicy {
        super::builder::metadata_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::metadata_service::TestIamPermissions {
        super::builder::metadata_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::metadata_service::ListOperations {
        super::builder::metadata_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::metadata_service::GetOperation {
        super::builder::metadata_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::metadata_service::DeleteOperation {
        super::builder::metadata_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::metadata_service::CancelOperation {
        super::builder::metadata_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataplex API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataplex_v1::client::DataplexService;
/// let client = DataplexService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataplex API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Dataplex service provides data lakes as a service. The primary resources
/// offered by this service are Lakes, Zones and Assets which collectively allow
/// a data administrator to organize, manage, secure and catalog data across
/// their organization located across cloud projects in a variety of storage
/// systems including Cloud Storage and BigQuery.
///
/// # Configuration
///
/// To configure `DataplexService` use the `with_*` methods in the type returned
/// by [builder()][DataplexService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataplex.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::dataplex_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::dataplex_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `DataplexService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `DataplexService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct DataplexService {
    inner: std::sync::Arc<dyn super::stub::dynamic::DataplexService>,
}

impl DataplexService {
    /// Returns a builder for [DataplexService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataplex_v1::client::DataplexService;
    /// let client = DataplexService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::dataplex_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::dataplex_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::DataplexService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::DataplexService>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataplexService> {
        super::transport::DataplexService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::DataplexService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::DataplexService::new)
    }

    /// Creates a lake resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_lake(&self) -> super::builder::dataplex_service::CreateLake {
        super::builder::dataplex_service::CreateLake::new(self.inner.clone())
    }

    /// Updates a lake resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_lake(&self) -> super::builder::dataplex_service::UpdateLake {
        super::builder::dataplex_service::UpdateLake::new(self.inner.clone())
    }

    /// Deletes a lake resource. All zones within the lake must be deleted before
    /// the lake can be deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_lake(&self) -> super::builder::dataplex_service::DeleteLake {
        super::builder::dataplex_service::DeleteLake::new(self.inner.clone())
    }

    /// Lists lake resources in a project and location.
    pub fn list_lakes(&self) -> super::builder::dataplex_service::ListLakes {
        super::builder::dataplex_service::ListLakes::new(self.inner.clone())
    }

    /// Retrieves a lake resource.
    pub fn get_lake(&self) -> super::builder::dataplex_service::GetLake {
        super::builder::dataplex_service::GetLake::new(self.inner.clone())
    }

    /// Lists action resources in a lake.
    pub fn list_lake_actions(&self) -> super::builder::dataplex_service::ListLakeActions {
        super::builder::dataplex_service::ListLakeActions::new(self.inner.clone())
    }

    /// Creates a zone resource within a lake.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_zone(&self) -> super::builder::dataplex_service::CreateZone {
        super::builder::dataplex_service::CreateZone::new(self.inner.clone())
    }

    /// Updates a zone resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_zone(&self) -> super::builder::dataplex_service::UpdateZone {
        super::builder::dataplex_service::UpdateZone::new(self.inner.clone())
    }

    /// Deletes a zone resource. All assets within a zone must be deleted before
    /// the zone can be deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_zone(&self) -> super::builder::dataplex_service::DeleteZone {
        super::builder::dataplex_service::DeleteZone::new(self.inner.clone())
    }

    /// Lists zone resources in a lake.
    pub fn list_zones(&self) -> super::builder::dataplex_service::ListZones {
        super::builder::dataplex_service::ListZones::new(self.inner.clone())
    }

    /// Retrieves a zone resource.
    pub fn get_zone(&self) -> super::builder::dataplex_service::GetZone {
        super::builder::dataplex_service::GetZone::new(self.inner.clone())
    }

    /// Lists action resources in a zone.
    pub fn list_zone_actions(&self) -> super::builder::dataplex_service::ListZoneActions {
        super::builder::dataplex_service::ListZoneActions::new(self.inner.clone())
    }

    /// Creates an asset resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_asset(&self) -> super::builder::dataplex_service::CreateAsset {
        super::builder::dataplex_service::CreateAsset::new(self.inner.clone())
    }

    /// Updates an asset resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_asset(&self) -> super::builder::dataplex_service::UpdateAsset {
        super::builder::dataplex_service::UpdateAsset::new(self.inner.clone())
    }

    /// Deletes an asset resource. The referenced storage resource is detached
    /// (default) or deleted based on the associated Lifecycle policy.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_asset(&self) -> super::builder::dataplex_service::DeleteAsset {
        super::builder::dataplex_service::DeleteAsset::new(self.inner.clone())
    }

    /// Lists asset resources in a zone.
    pub fn list_assets(&self) -> super::builder::dataplex_service::ListAssets {
        super::builder::dataplex_service::ListAssets::new(self.inner.clone())
    }

    /// Retrieves an asset resource.
    pub fn get_asset(&self) -> super::builder::dataplex_service::GetAsset {
        super::builder::dataplex_service::GetAsset::new(self.inner.clone())
    }

    /// Lists action resources in an asset.
    pub fn list_asset_actions(&self) -> super::builder::dataplex_service::ListAssetActions {
        super::builder::dataplex_service::ListAssetActions::new(self.inner.clone())
    }

    /// Creates a task resource within a lake.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_task(&self) -> super::builder::dataplex_service::CreateTask {
        super::builder::dataplex_service::CreateTask::new(self.inner.clone())
    }

    /// Update the task resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_task(&self) -> super::builder::dataplex_service::UpdateTask {
        super::builder::dataplex_service::UpdateTask::new(self.inner.clone())
    }

    /// Delete the task resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_task(&self) -> super::builder::dataplex_service::DeleteTask {
        super::builder::dataplex_service::DeleteTask::new(self.inner.clone())
    }

    /// Lists tasks under the given lake.
    pub fn list_tasks(&self) -> super::builder::dataplex_service::ListTasks {
        super::builder::dataplex_service::ListTasks::new(self.inner.clone())
    }

    /// Get task resource.
    pub fn get_task(&self) -> super::builder::dataplex_service::GetTask {
        super::builder::dataplex_service::GetTask::new(self.inner.clone())
    }

    /// Lists Jobs under the given task.
    pub fn list_jobs(&self) -> super::builder::dataplex_service::ListJobs {
        super::builder::dataplex_service::ListJobs::new(self.inner.clone())
    }

    /// Run an on demand execution of a Task.
    pub fn run_task(&self) -> super::builder::dataplex_service::RunTask {
        super::builder::dataplex_service::RunTask::new(self.inner.clone())
    }

    /// Get job resource.
    pub fn get_job(&self) -> super::builder::dataplex_service::GetJob {
        super::builder::dataplex_service::GetJob::new(self.inner.clone())
    }

    /// Cancel jobs running for the task resource.
    pub fn cancel_job(&self) -> super::builder::dataplex_service::CancelJob {
        super::builder::dataplex_service::CancelJob::new(self.inner.clone())
    }

    /// Create an environment resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_environment(&self) -> super::builder::dataplex_service::CreateEnvironment {
        super::builder::dataplex_service::CreateEnvironment::new(self.inner.clone())
    }

    /// Update the environment resource.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_environment(&self) -> super::builder::dataplex_service::UpdateEnvironment {
        super::builder::dataplex_service::UpdateEnvironment::new(self.inner.clone())
    }

    /// Delete the environment resource. All the child resources must have been
    /// deleted before environment deletion can be initiated.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_environment(&self) -> super::builder::dataplex_service::DeleteEnvironment {
        super::builder::dataplex_service::DeleteEnvironment::new(self.inner.clone())
    }

    /// Lists environments under the given lake.
    pub fn list_environments(&self) -> super::builder::dataplex_service::ListEnvironments {
        super::builder::dataplex_service::ListEnvironments::new(self.inner.clone())
    }

    /// Get environment resource.
    pub fn get_environment(&self) -> super::builder::dataplex_service::GetEnvironment {
        super::builder::dataplex_service::GetEnvironment::new(self.inner.clone())
    }

    /// Lists session resources in an environment.
    pub fn list_sessions(&self) -> super::builder::dataplex_service::ListSessions {
        super::builder::dataplex_service::ListSessions::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::dataplex_service::ListLocations {
        super::builder::dataplex_service::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::dataplex_service::GetLocation {
        super::builder::dataplex_service::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::dataplex_service::SetIamPolicy {
        super::builder::dataplex_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::dataplex_service::GetIamPolicy {
        super::builder::dataplex_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::dataplex_service::TestIamPermissions {
        super::builder::dataplex_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::dataplex_service::ListOperations {
        super::builder::dataplex_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::dataplex_service::GetOperation {
        super::builder::dataplex_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::dataplex_service::DeleteOperation {
        super::builder::dataplex_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::dataplex_service::CancelOperation {
        super::builder::dataplex_service::CancelOperation::new(self.inner.clone())
    }
}
